﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Teacher teacher = new Teacher();
            teacher.Id = 001;
            teacher.Name = "孔子";
            teacher.Sex = '男';
            teacher.Cardid = 88888888;
            teacher.Tel = 13004568;
            teacher.Title = "辅导员";
            teacher.Wageno = 5001;
            teacher.Print();

            Student student = new Student();
            student.Id = 001;
            student.Name = "曾子";
            student.Sex = '男';
            student.Cardid = 6666666;
            student.Tel = 5211314;
            student.Major = "孔孟之道";
            student.Grade = "孔学一年级";
            student.Print();

        }
    }
    class Person
    {
        //编号（Id）、姓名（Name）,性别 （Sex）、身份证号（Cardid）、联系方式（Tel）
        public int Id;
        public string Name;
        public char Sex;
        public int Cardid;
        public int Tel;
        public Person() { }
        public Person(int Id, string Name, char Sex, int Cardid, int Tel, string Major, string Grade)
        {
            this.Id = Id;
            this.Name = Name;
            this.Sex = Sex;
            this.Cardid = Cardid;

        }
        public void Print()
        {

            Console.WriteLine("我的Id为:{0},我的姓名是：{1},我的性别是{2},我的身份证号是{3},我的联系方式是{4}", this.Id, this.Name, this.Sex,this.Cardid, this.Tel);
        }
    }
    class Student : Person
    {
        //（Id）、姓名（Name）、性别（Sex）、身份证号（Cardid）、联系方式（Tel）、专业（Major）、年级（Grade）
        public string Major;
        public string Grade;
        public Student() { }
        public Student(int Id, string Name, char Sex, int Cardid, int Tel, string Major, string Grade)
        {   //父的有参构造写后，跟父的有参相同的如注释部分可不写
            //this.Id = Id;
            //this.Name = Name;
            //this.Sex = Sex;
            //this.Cardid = Cardid;
            this.Major = Major;
            this.Grade = Grade;
        }
        public void Print()
        {
            Console.WriteLine("我的Id为{0},我的姓名是：{1},我的性别是{2},我的身份证号是{3},我的联系方式是{4},我的专业是{5},我的年级是：{6}", this.Id, this.Name, this.Sex, this.Cardid, this.Tel, this.Major, this.Grade);
        }
    }
    class Teacher : Person
    {
        //编号（Id）、姓名（Name）,性别 （Sex）、身份证号（Cardid）、联系方式（Tel）、职称（Title）、工资号（Wageno）
        public string Title;
        public int Wageno;
        public Teacher() { }
        public Teacher(int Id, string Name, char Sex, int Cardid, int Tel, string Title, int Wageno)
        {   //父的有参构造写后，跟父的有参相同的如注释部分可不写
            //this.Id = Id;
            //this.Name = Name;
            //this.Sex = Sex;
            //this.Cardid = Cardid;
            this.Title = Title;
            this.Wageno = Wageno;

        }
        public void Print()
        {
            Console.WriteLine("我的Id为{0},我的姓名是：{1},我的性别是{2},我的身份证号是{3},我的联系方式是{4},我的职称是{5},我的工资号为：{6}", this.Id, this.Name, this.Sex, this.Cardid, this.Tel, this.Title, this.Wageno);
        }
    }
}
